<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateCouponsConfig extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('coupons_config', function (Blueprint $table) {
            $table->id();
            $table->timestamps();
            $table->string("title")->comment("礼品券的标题");
            $table->string("descript")->comment("礼品券的描述");
            $table->integer("expire_day")->nullable()->comment("设置多久后过期");
            $table->integer("type")->default(1)->comment("券的性质,1是签到送啥啥，2是注册即送 这里有一个一键补发签到礼品券的功能，防止后期加入新礼品券签到过的人领不到。补发范围为连续签到日超过一天的人");
            $table->integer("required_days")->nullable()->comment("券性质为签到送礼时才用。规定签到多少天送啥");
        });
    }

    /**
     * Reverse the migrations.0
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('coupons_config');
    }
}
